#!/usr/bin/env python

import sys
import os

def go(plik,out):
    print >>out,"".join(( x if ord(x)<128 else "&#%d;"%ord(x) for x in unicode(plik.read(),'utf-8')))
    
for name in os.listdir("zrodlo"):
    if name[-4:] == ".jsp":
        go(open("zrodlo/"+name,"r"),open("encje/"+name,"w"))


